-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui-codemods): add codemod for v10 color update
Closes: INSTUI-4144
- Loading branch information
1 parent
f55dc3e
commit 566751b
Showing
8 changed files
with
1,721 additions
and
1 deletion.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
packages/ui-codemods/__testfixtures__/updateV10Breaking/colors.input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* eslint-disable */ | ||
import { canvas, canvasHighContrast } from '@instructure/ui' | ||
|
||
export const generateStyle = () => { | ||
return { | ||
logoSubtitle: { | ||
label: 'logoSubtitle', | ||
marginTop: '-3px' | ||
}, | ||
optionWrapper: { | ||
label: 'optionWrapper', | ||
margin: '-0.5rem -0.75rem', | ||
padding: '0.5rem 0.75rem', | ||
border: '0 solid ' + canvas.colors.tiara, | ||
borderBottomWidth: '1px', | ||
display: 'flex', | ||
maxWidth: '100%', | ||
overflow: 'hidden', | ||
alignItems: 'center' | ||
}, | ||
optionIcon: { | ||
label: 'optionIcon', | ||
width: '36px', | ||
height: '36px', | ||
backgroundColor: canvasHighContrast.colors.oxford, | ||
borderRadius: 100, | ||
flexShrink: 0, | ||
display: 'flex', | ||
justifyContent: 'center', | ||
alignItems: 'center' | ||
}, | ||
truncateSingleLine: { | ||
overflow: 'hidden', | ||
whiteSpace: 'nowrap', | ||
textOverflow: 'ellipsis' | ||
} | ||
} | ||
} | ||
|
||
export const generateComponentTheme = () => ({}) |
40 changes: 40 additions & 0 deletions
40
packages/ui-codemods/__testfixtures__/updateV10Breaking/colors.output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* eslint-disable */ | ||
import { canvas, canvasHighContrast } from '@instructure/ui' | ||
|
||
export const generateStyle = () => { | ||
return { | ||
logoSubtitle: { | ||
label: 'logoSubtitle', | ||
marginTop: '-3px' | ||
}, | ||
optionWrapper: { | ||
label: 'optionWrapper', | ||
margin: '-0.5rem -0.75rem', | ||
padding: '0.5rem 0.75rem', | ||
border: '0 solid ' + canvas.colors?.contrasts?.grey1214, | ||
borderBottomWidth: '1px', | ||
display: 'flex', | ||
maxWidth: '100%', | ||
overflow: 'hidden', | ||
alignItems: 'center' | ||
}, | ||
optionIcon: { | ||
label: 'optionIcon', | ||
width: '36px', | ||
height: '36px', | ||
backgroundColor: canvasHighContrast.colors?.contrasts?.grey100100, | ||
borderRadius: 100, | ||
flexShrink: 0, | ||
display: 'flex', | ||
justifyContent: 'center', | ||
alignItems: 'center' | ||
}, | ||
truncateSingleLine: { | ||
overflow: 'hidden', | ||
whiteSpace: 'nowrap', | ||
textOverflow: 'ellipsis' | ||
} | ||
} | ||
} | ||
|
||
export const generateComponentTheme = () => ({}) |
Oops, something went wrong.