We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
styled
styled-components
Source: https://rebassjs.org/extending/
I was wondering why it is not recommended to use the styled API from styled-components for Extending?
Would be doing something like this a bad idea? Why? 🙂
import React from 'react'; import {Box, Text} from 'rebass/styled-components'; import styled from 'styled-components'; // Extending from styled const Wrapper = styled(Box)` position: absolute; top: 10%; `; export default function ComponentName() { return ( <Wrapper> <Text>Hello World</Text> </Wrapper> ); }
Note: normally, I would use an sx prop instead of using styled, but I wanted to keep the example simple.
sx
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Source: https://rebassjs.org/extending/
I was wondering why it is not recommended to use the
styled
API fromstyled-components
for Extending?Would be doing something like this a bad idea? Why? 🙂
Note: normally, I would use an
sx
prop instead of usingstyled
, but I wanted to keep the example simple.The text was updated successfully, but these errors were encountered: