File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,21 @@ The best styles are the ones you don’t write - whenever possible use existing
99
1010## Basics
1111
12- To use Style Components pull in ` styled ` and apply your CSS. For consistent spacing you should also use ` space() ` :
12+ To use Style Components, import ` styled ` from ` @emotion/ styled` and apply custom CSS. For consistent spacing you should also use ` space() ` :
1313
1414``` tsx
1515import styled from ' @emotion/styled' ;
1616import {space } from ' sentry/styles/space' ;
1717
18+ export default ExampleComponent () {
19+ return (
20+ <SideBySide >
21+ <p >a number : <Numeric >1 </Numeric ></p >
22+ <p >and another : <Numeric >2 </Numeric ></p >
23+ </SideBySide >
24+ )
25+ }
26+
1827const Numeric = styled (' span' )`
1928 font-variant-numeric: tabular-nums;
2029` ;
@@ -26,14 +35,6 @@ const SideBySide = styled('div')`
2635 align-items: flex-start;
2736` ;
2837
29- export default ExampleComponent () {
30- return (
31- <SideBySide >
32- <p >a number : <Numeric >1 </Numeric ></p >
33- <p >and another : <Numeric >2 </Numeric ></p >
34- </SideBySide >
35- )
36- }
3738```
3839
3940## Theme
You can’t perform that action at this time.
0 commit comments