@@ -11,10 +11,15 @@ import {
1111 faMagic ,
1212 faTrashCan ,
1313 faPlus ,
14+ faCheck ,
1415 faDownload ,
16+ faExclamationCircle ,
1517 faUpRightAndDownLeftFromCenter ,
1618 faClose ,
17- faGrip , faTable ,
19+ faGrip ,
20+ faTable ,
21+ faWarning ,
22+ faInfoCircle ,
1823} from ' @fortawesome/free-solid-svg-icons' ;
1924import { FontAwesomeIcon } from ' @fortawesome/react-fontawesome' ;
2025
@@ -125,20 +130,60 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
125130 <FontAwesomeIcon icon = { faClose } />
126131 </IconButton >
127132 </Stack >
133+ <Stack direction = " row" gap = { 3 } sx = { { flexWrap: ' wrap' }} >
134+ <IconButton color = " primary" >
135+ <FontAwesomeIcon icon = { faPlus } />
136+ </IconButton >
137+ <IconButton color = " secondary" >
138+ <FontAwesomeIcon icon = { faPlus } />
139+ </IconButton >
140+ <IconButton color = " info" >
141+ <FontAwesomeIcon icon = { faInfoCircle } />
142+ </IconButton >
143+ <IconButton color = " success" >
144+ <FontAwesomeIcon icon = { faCheck } />
145+ </IconButton >
146+ <IconButton color = " warning" >
147+ <FontAwesomeIcon icon = { faWarning } />
148+ </IconButton >
149+ <IconButton color = " error" >
150+ <FontAwesomeIcon icon = { faExclamationCircle } />
151+ </IconButton >
152+ </Stack >
153+ <Stack direction = " row" gap = { 3 } sx = { { flexWrap: ' wrap' }} >
154+ <IconButton variant = " contained" color = " primary" >
155+ <FontAwesomeIcon icon = { faPlus } />
156+ </IconButton >
157+ <IconButton variant = " contained" color = " secondary" >
158+ <FontAwesomeIcon icon = { faPlus } />
159+ </IconButton >
160+ <IconButton variant = " contained" color = " info" >
161+ <FontAwesomeIcon icon = { faInfoCircle } />
162+ </IconButton >
163+ <IconButton variant = " contained" color = " success" >
164+ <FontAwesomeIcon icon = { faCheck } />
165+ </IconButton >
166+ <IconButton variant = " contained" color = " warning" >
167+ <FontAwesomeIcon icon = { faWarning } />
168+ </IconButton >
169+ <IconButton variant = " contained" color = " error" >
170+ <FontAwesomeIcon icon = { faExclamationCircle } />
171+ </IconButton >
172+ </Stack >
128173</ThemeProvider >
129174
130175## Toggle Button
131176
132- While MUI provides color variants, stick to the default one as the colored variant don't make much semantic sense (expect
177+ While MUI provides color variants, stick to the default one as the colored variant don't make much semantic sense (expect
133178maybe for the _ danger_ one).
134179
135180### Text
136181
137182<Unstyled >
138183 <ThemeProvider theme = { theme } >
139184 <Stack gap = { 3 } direction = " row" >
140- <LensToggle segments = { [{label: ' Geo location' }, {label: ' Manual location' }]} />
141- <LensToggle segments = { [{label: ' Geo location' }, {label: ' Manual location' }]} color = " primary" />
185+ <LensToggle segments = { [{ label: ' Geo location' }, { label: ' Manual location' }]} />
186+ <LensToggle segments = { [{ label: ' Geo location' }, { label: ' Manual location' }]} color = " primary" />
142187 </Stack >
143188 </ThemeProvider >
144189</Unstyled >
@@ -148,8 +193,8 @@ maybe for the _danger_ one).
148193<Unstyled >
149194 <ThemeProvider theme = { theme } >
150195 <Stack gap = { 3 } direction = " row" >
151- <LensToggle segments = { [{icon: faGrip }, {icon: faTable }]} />
152- <LensToggle segments = { [{icon: faGrip }, {icon: faTable }]} color = " primary" />
196+ <LensToggle segments = { [{ icon: faGrip }, { icon: faTable }]} />
197+ <LensToggle segments = { [{ icon: faGrip }, { icon: faTable }]} color = " primary" />
153198 </Stack >
154199 </ThemeProvider >
155200</Unstyled >
@@ -159,8 +204,9 @@ maybe for the _danger_ one).
159204<Unstyled >
160205 <ThemeProvider theme = { theme } >
161206 <Stack gap = { 3 } direction = " row" >
162- <LensToggle segments = { [{icon: faGrip , label: ' Geo location' }, {icon: faTable , label: ' Manual location' }]} />
163- <LensToggle segments = { [{icon: faGrip , label: ' Geo location' }, {icon: faTable , label: ' Manual location' }]} color = " primary" />
207+ <LensToggle segments = { [{ icon: faGrip , label: ' Geo location' }, { icon: faTable , label: ' Manual location' }]} />
208+ <LensToggle segments = { [{ icon: faGrip , label: ' Geo location' }, { icon: faTable , label: ' Manual location' }]}
209+ color = " primary" />
164210 </Stack >
165211 </ThemeProvider >
166212</Unstyled >
@@ -169,15 +215,18 @@ maybe for the _danger_ one).
169215on icon only toggles, we have to decrease the padding so that the total size is less or equal to 31px.
170216
171217The root issue is that we use ` :only-child ` selector on icon only toggle buttons, but text nodes are not considered children
172- elements in CSS, so icon + text is mistakenly selected by the rule.
218+ elements in CSS, so icon + text is mistakenly selected by the rule.
173219
174220If you want to prevent that, you can wrap the text in a ` span ` element, like so:
175221
176222<Unstyled >
177223 <ThemeProvider theme = { theme } >
178224 <Stack gap = { 3 } direction = " row" >
179- <LensToggle withWrapAroundLabel segments = { [{icon: faGrip , label: ' Geo location' }, {icon: faTable , label: ' Manual location' }]} />
180- <LensToggle withWrapAroundLabel segments = { [{icon: faGrip , label: ' Geo location' }, {icon: faTable , label: ' Manual location' }]} color = " primary" />
225+ <LensToggle withWrapAroundLabel
226+ segments = { [{ icon: faGrip , label: ' Geo location' }, { icon: faTable , label: ' Manual location' }]} />
227+ <LensToggle withWrapAroundLabel
228+ segments = { [{ icon: faGrip , label: ' Geo location' }, { icon: faTable , label: ' Manual location' }]}
229+ color = " primary" />
181230 </Stack >
182231 </ThemeProvider >
183232</Unstyled >
0 commit comments