File tree Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 11import * as React from 'react' ;
22
3- import { Icon , IconProp } from '../../icons' ;
3+ import { Icon , IconKey } from '../../icons' ;
44import { styled , css } from '../../styles' ;
55import { omit } from 'lodash' ;
66import { UnstyledButton } from './inputs' ;
@@ -45,7 +45,7 @@ export const TabsContainer = styled((p: {
4545export const Tab = styled ( ( p : {
4646 className ?: string ,
4747 selected ?: boolean ,
48- icon : IconProp ,
48+ icon : IconKey ,
4949 value : any ,
5050 children : React . ReactNode
5151} ) =>
@@ -56,7 +56,7 @@ export const Tab = styled((p: {
5656 event . tabValue = p . value ;
5757 } }
5858 >
59- < Icon icon = { p . icon } size = '2x' />
59+ < Icon icon = { p . icon } />
6060 { p . children }
6161 </ UnstyledButton >
6262) `
@@ -89,5 +89,7 @@ export const Tab = styled((p: {
8989
9090 > svg {
9191 margin-bottom: 10px;
92+ width: 2em;
93+ height: auto;
9294 }
9395` ;
Original file line number Diff line number Diff line change @@ -300,25 +300,25 @@ class SettingsPage extends React.Component<SettingsPageProps> {
300300 } }
301301 >
302302 < Tab
303- icon = { [ 'fas' , 'magic' ] }
303+ icon = 'MagicWand'
304304 value = 'automatic'
305305 >
306306 Automatic
307307 </ Tab >
308308 < Tab
309- icon = { [ 'fas' , 'sun' ] }
309+ icon = 'Sun'
310310 value = 'light'
311311 >
312312 Light
313313 </ Tab >
314314 < Tab
315- icon = { [ 'fas' , 'moon' ] }
315+ icon = 'Moon'
316316 value = 'dark'
317317 >
318318 Dark
319319 </ Tab >
320320 < Tab
321- icon = { [ 'fas' , 'adjust' ] }
321+ icon = 'CircleHalf'
322322 value = 'high-contrast'
323323 >
324324 High Contrast
Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ import {
1919 Plug ,
2020 QuestionMark ,
2121 ArrowLeft ,
22+ MagicWand ,
23+ Sun ,
24+ Moon ,
25+ CircleHalf
2226} from '@phosphor-icons/react' ;
2327
2428export type IconKey = keyof typeof Icons ;
@@ -46,6 +50,10 @@ const Icons = {
4650 Plug,
4751 QuestionMark,
4852 ArrowLeft,
53+ MagicWand,
54+ Sun,
55+ Moon,
56+ CircleHalf
4957} as const ;
5058
5159// Import required FA icons:
You can’t perform that action at this time.
0 commit comments