Skip to content

Commit

Permalink
chore: make shadow props (insetShadow) opt-in
Browse files Browse the repository at this point in the history
  • Loading branch information
WesSouza committed Jul 17, 2022
1 parent 01383c2 commit 2d929ec
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/Cutout/Cutout.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const Cutout = React.forwardRef(function Cutout(props, ref) {

Cutout.defaultProps = {
children: null,
shadow: true
shadow: false
};

Cutout.propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion src/DatePicker/DatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class DatePicker extends Component {
};

static defaultProps = {
shadow: true,
shadow: false,
className: '',
onAccept: null,
onCancel: null,
Expand Down
2 changes: 1 addition & 1 deletion src/List/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const List = React.forwardRef(function List(props, ref) {

List.defaultProps = {
fullWidth: false,
shadow: true,
shadow: false,
inline: false,
children: null
};
Expand Down
8 changes: 4 additions & 4 deletions src/List/List.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ menu: Components

import { Playground, Props } from 'docz';

import List from './List'
import ListItem from '../ListItem/ListItem'
import List from './List';
import ListItem from '../ListItem/ListItem';

# List

Expand Down Expand Up @@ -38,10 +38,10 @@ import ListItem from '../ListItem/ListItem'
</List>
</Playground>

#### No shadow
#### With shadow

<Playground>
<List shadow={false}>
<List shadow>
<ListItem>Photos</ListItem>
<ListItem>Videos</ListItem>
<ListItem>Other</ListItem>
Expand Down
5 changes: 2 additions & 3 deletions src/NumberField/NumberField.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ import Cutout from '../Cutout/Cutout'
/>
</Playground>

#### No shadow
#### With shadow

<Playground>
<NumberField
shadow={false}
shadow
value={1991}
onChange={value => console.log(value)}
/>
Expand All @@ -60,7 +60,6 @@ import Cutout from '../Cutout/Cutout'
</p>
<NumberField
variant='flat'
shadow={false}
value={1991}
onChange={value => console.log(value)}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/Progress/Progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const Progress = forwardRef(function Progress(props, ref) {

Progress.defaultProps = {
value: 0,
shadow: true,
shadow: false,
variant: 'default',
hideValue: false
};
Expand Down
2 changes: 1 addition & 1 deletion src/Select/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ Select.defaultProps = {
options: [],
readOnly: undefined,
SelectDisplayProps: {},
shadow: true,
shadow: false,
style: {},
value: undefined,
variant: 'default',
Expand Down
4 changes: 2 additions & 2 deletions src/Select/Select.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import Cutout from '../Cutout/Cutout'
}}
</Playground>

#### No shadow
#### With shadow

<Playground>
{() => {
Expand All @@ -76,7 +76,7 @@ import Cutout from '../Cutout/Cutout'
];
return (
<Select
shadow={false}
shadow
items={items}
onChange={value => console.log(value)}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/TextField/TextField.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ TextField.defaultProps = {
fullWidth: null,
multiline: false,
onChange: () => {},
shadow: true,
shadow: false,
style: {},
type: 'text',
variant: 'default'
Expand Down
4 changes: 2 additions & 2 deletions src/TextField/TextField.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import Cutout from '../Cutout/Cutout';
<TextField defaultValue='' onChange={e => console.log(e.target.value)} />
</Playground>

#### No shadow
#### With shadow

<Playground>
<TextField
defaultValue='No shadow'
shadow={false}
shadow
onChange={e => console.log(e.target.value)}
/>
</Playground>
Expand Down
2 changes: 1 addition & 1 deletion src/Window/Window.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const Window = React.forwardRef(function Window(props, ref) {

Window.defaultProps = {
resizable: false,
shadow: true,
shadow: false,
children: null
};

Expand Down

0 comments on commit 2d929ec

Please sign in to comment.