Skip to content
This repository was archived by the owner on Sep 11, 2021. It is now read-only.

Commit bcb1186

Browse files
authored
Merge pull request #3 from stefanbauer/add-shadows-to-configuration
Add shadow configuration
2 parents f3a0435 + 088edc2 commit bcb1186

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/pages/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Here is a list of the all of the available options, as well as their default val
4949
backgroundColor: defaultTheme.colors.white,
5050
focusBorderColor: defaultTheme.colors.blue[400],
5151
focusShadow: defaultTheme.boxShadow.outline,
52+
boxShadow: defaultTheme.boxShadow.none,
5253
checkboxSize: '1em',
5354
radioSize: '1em',
5455
checkboxIcon: \`<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="#fff"><path d="M13.293 4.293a1 1 0 0 1 0 1.414L7 12a1 1 0 0 1-1.414 0L3.293 9.707a1 1 0 0 1 1.414-1.414l1.586 1.586 5.586-5.586a1 1 0 0 1 1.414 0z"/></svg>\`,

index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports = function ({ addUtilities, addComponents, theme }) {
1414
backgroundColor: defaultTheme.colors.white,
1515
focusBorderColor: defaultTheme.colors.blue[400],
1616
focusShadow: defaultTheme.boxShadow.outline,
17+
boxShadow: defaultTheme.boxShadow.none,
1718
checkboxSize: '1em',
1819
radioSize: '1em',
1920
checkboxIcon: `<svg viewBox="0 0 16 16" fill="#fff" xmlns="http://www.w3.org/2000/svg"><path d="M5.707 7.293a1 1 0 0 0-1.414 1.414l2 2a1 1 0 0 0 1.414 0l4-4a1 1 0 0 0-1.414-1.414L7 8.586 5.707 7.293z"/></svg>`,
@@ -28,6 +29,7 @@ module.exports = function ({ addUtilities, addComponents, theme }) {
2829
addComponents({
2930
'.form-checkbox': {
3031
appearance: 'none',
32+
boxShadow: options.boxShadow,
3133
display: 'inline-block',
3234
height: options.checkboxSize,
3335
width: options.checkboxSize,
@@ -63,6 +65,7 @@ module.exports = function ({ addUtilities, addComponents, theme }) {
6365
},
6466
'.form-radio': {
6567
appearance: 'none',
68+
boxShadow: options.boxShadow,
6669
display: 'inline-block',
6770
height: options.radioSize,
6871
width: options.radioSize,
@@ -102,6 +105,7 @@ module.exports = function ({ addUtilities, addComponents, theme }) {
102105
borderColor: options.borderColor,
103106
borderWidth: options.borderWidth,
104107
borderRadius: options.borderRadius,
108+
boxShadow: options.boxShadow,
105109
padding: `${options.verticalPadding} ${options.horizontalPadding}`,
106110
fontSize: options.fontSize,
107111
lineHeight: options.lineHeight,
@@ -116,6 +120,7 @@ module.exports = function ({ addUtilities, addComponents, theme }) {
116120
borderColor: options.borderColor,
117121
borderWidth: options.borderWidth,
118122
borderRadius: options.borderRadius,
123+
boxShadow: options.boxShadow,
119124
paddingTop: options.verticalPadding,
120125
paddingRight: `calc(${options.selectIconOffset} * 2 + ${options.selectIconSize})`,
121126
paddingBottom: options.verticalPadding,

0 commit comments

Comments
 (0)