File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ export default {
3333 'readable' ,
3434 'no-ligatures' ,
3535 'no-margin' ,
36+ 'ellipsis' ,
3637 ] ,
3738 } ,
3839 description : 'The variant of the text' ,
Original file line number Diff line number Diff line change 11{
22 "name" : " @solved-ac/ui-react" ,
3- "version" : " 0.2.7 " ,
3+ "version" : " 0.2.8 " ,
44 "description" : " React component library used by solved.ac" ,
55 "author" : " shiftpsh" ,
66 "license" : " MIT" ,
Original file line number Diff line number Diff line change 11import { css } from '@emotion/react'
22import styled from '@emotion/styled'
3+ import { ellipsis } from 'polished'
34import React , { ElementType } from 'react'
45import { SolvedTheme , solvedThemes } from '../styles'
56import { PC , PP , PR } from '../types/PolymorphicElementProps'
@@ -27,6 +28,7 @@ const variants = (theme: SolvedTheme) =>
2728 ` ,
2829 h1 : css `
2930 display : block;
31+ word-break : keep-all;
3032 font-weight : 800 ;
3133 font-size : 2em ;
3234 letter-spacing : -0.04ch ;
@@ -37,6 +39,7 @@ const variants = (theme: SolvedTheme) =>
3739 ` ,
3840 h2 : css `
3941 display : block;
42+ word-break : keep-all;
4043 font-weight : 800 ;
4144 font-size : 1.5em ;
4245 letter-spacing : -0.02ch ;
@@ -47,6 +50,7 @@ const variants = (theme: SolvedTheme) =>
4750 ` ,
4851 h3 : css `
4952 display : block;
53+ word-break : keep-all;
5054 font-weight : 800 ;
5155 font-size : 1.2em ;
5256 margin-block-start : 1em ;
@@ -102,6 +106,9 @@ const variants = (theme: SolvedTheme) =>
102106 'no-margin' : css `
103107 margin : 0 ;
104108 ` ,
109+ ellipsis : css `
110+ ${ ellipsis ( ) }
111+ ` ,
105112 } as const )
106113
107114const variantKeys = Object . keys ( variants ( solvedThemes . light ) )
You can’t perform that action at this time.
0 commit comments