File tree Expand file tree Collapse file tree 3 files changed +39
-20
lines changed Expand file tree Collapse file tree 3 files changed +39
-20
lines changed Original file line number Diff line number Diff line change 1
1
import { Box , Heading } from '@chakra-ui/react'
2
+ import { BtnTertiary } from './molecules'
2
3
3
4
export function Playground ( ) : JSX . Element {
4
5
return (
5
6
< Box p = "5rem 1rem" >
6
7
< Heading as = "h1" size = "sm" >
7
8
eClass Design System Playground
8
9
</ Heading >
10
+
11
+ < BtnTertiary
12
+ iconCustom = {
13
+ < svg xmlns = "http://www.w3.org/2000/svg" width = { 16 } height = { 16 } fill = "none" >
14
+ < path
15
+ fill = "#28A745"
16
+ fillRule = "evenodd"
17
+ d = "M0 8c0-4.4 3.6-8 8-8s8 3.6 8 8-3.6 8-8 8-8-3.6-8-8Zm3.6 0L7 11.4 12.4 6 11 4.6l-4 4-2-2L3.6 8Z"
18
+ clipRule = "evenodd"
19
+ />
20
+ </ svg >
21
+ }
22
+ >
23
+ ahead
24
+ </ BtnTertiary >
25
+ < BtnTertiary iconStatus = "ahead" > ahead</ BtnTertiary >
26
+ < BtnTertiary iconStatus = "answer" > answer</ BtnTertiary >
27
+ < BtnTertiary iconStatus = "back" > back</ BtnTertiary >
28
+ < BtnTertiary iconStatus = "edit" > edit</ BtnTertiary >
29
+ < BtnTertiary iconStatus = "delete" > delete</ BtnTertiary >
30
+ < BtnTertiary iconStatus = "more" > more</ BtnTertiary >
31
+ < BtnTertiary iconStatus = "password" > password</ BtnTertiary >
32
+ < BtnTertiary iconStatus = "multimedia" > multimedia</ BtnTertiary >
33
+ < BtnTertiary iconStatus = "record" > record</ BtnTertiary >
34
+ < BtnTertiary iconStatus = "download" > download</ BtnTertiary >
35
+ < BtnTertiary iconStatus = "noIcon" > noIcon</ BtnTertiary >
9
36
</ Box >
10
37
)
11
38
}
Original file line number Diff line number Diff line change @@ -2,17 +2,17 @@ import * as React from 'react'
2
2
import * as ReactDOM from 'react-dom'
3
3
import { ChakraProvider } from '@chakra-ui/react'
4
4
5
- import { Documentation } from './documentation'
6
- // import { Playground } from './Playground'
5
+ // import { Documentation } from './documentation'
6
+ import { Playground } from './Playground'
7
7
8
8
import { theme } from './theme'
9
9
10
10
if ( import . meta. env . VITE_REACT_DEPLOY_DOCUMENTATION === 'DOCUMENTATION' ) {
11
11
ReactDOM . render (
12
12
< React . StrictMode >
13
13
< ChakraProvider theme = { theme } >
14
- { /* <Playground /> */ }
15
- < Documentation />
14
+ < Playground />
15
+ { /* <Documentation /> */ }
16
16
</ ChakraProvider >
17
17
</ React . StrictMode > ,
18
18
document . getElementById ( 'root' )
Original file line number Diff line number Diff line change @@ -74,10 +74,14 @@ export function BtnTertiary({
74
74
noIcon : < > </ > ,
75
75
}
76
76
77
- let icon = btnIcons [ iconStatus ] ?? btnIcons . multimedia
77
+ let icon
78
+ if ( btnIcons [ iconStatus ] && iconStatus !== 'noIcon' ) {
79
+ icon = btnIcons [ iconStatus ]
80
+ }
78
81
if ( iconCustom ) {
79
82
icon = iconCustom
80
83
}
84
+
81
85
const rIcon = rightIcon ? icon : undefined
82
86
const lIcon = ! rightIcon ? icon : undefined
83
87
@@ -95,6 +99,7 @@ export function BtnTertiary({
95
99
lineHeight = "16px"
96
100
textDecorationLine = "underline"
97
101
borderRadius = "12px"
102
+ gap = "0.5rem"
98
103
paddingTop = { vars ( 'space-xxs' ) }
99
104
paddingBottom = { vars ( 'space-xxs' ) }
100
105
paddingLeft = { vars ( 'space-xs' ) }
@@ -120,21 +125,8 @@ export function BtnTertiary({
120
125
bg : 'transparent' ,
121
126
} }
122
127
sx = { {
123
- '&:hover' : {
124
- 'svg path' : {
125
- fill : `${ blue } ` ,
126
- } ,
127
- '@media (hover: none)' : {
128
- color : `${ gray } ` ,
129
- 'svg path' : {
130
- fill : colorIcon ,
131
- } ,
132
- } ,
133
- } ,
134
- '&:focus' : {
135
- 'svg path' : {
136
- fill : activeWhenPress ? `${ blue } ` : '' ,
137
- } ,
128
+ '>span' : {
129
+ mr : 0 ,
138
130
} ,
139
131
} }
140
132
>
You can’t perform that action at this time.
0 commit comments