Skip to content

Add box.js#348

Open
viankakrisna wants to merge 3 commits into
threepointone:masterfrom
viankakrisna:patch-1
Open

Add box.js#348
viankakrisna wants to merge 3 commits into
threepointone:masterfrom
viankakrisna:patch-1

Conversation

@viankakrisna
Copy link
Copy Markdown

@viankakrisna viankakrisna commented Dec 23, 2017

This way people with no access to modifying babel settings can use

import Box from 'glamor/box';

const Heading = props =>
    <Box component="h2" css={{fontSize: 12, ...props.css}}>
        Hello World
    </Box>

out of the box.

This way people with no access to modifying babel settings can use ```js <Box component="h2" css={{fontSize: 12}}>Hello World</Box>``` out of the box.
@jeroenransijn
Copy link
Copy Markdown

Consider this package if you need this functionality: https://github.com/segmentio/ui-box

@viankakrisna
Copy link
Copy Markdown
Author

thanks! but i want it in glamor so i can use it without installing another dependency / building it myself :)

@jeroenransijn
Copy link
Copy Markdown

Would this work with ref? You might need to add support for innerRef.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants