Skip to content

Commit

Permalink
adding snapshoots for unit-testing
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel Valdes Gutierrez <[email protected]>
  • Loading branch information
BigSamu committed Nov 9, 2023
1 parent 6914c7d commit 345fd2d
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/components/flex/flex_item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,23 @@ export const OuiFlexItem: FunctionComponent<
const classes = classNames(
'ouiFlexItem',
{
'ouiFlexItem--flexGrowZero': !grow, // use flex-grow: 0 and flex-basis: auto
'ouiFlexItem--flexShrinkZero': !shrink, // use flex-shrink: 0 and flex-basis: auto
'ouiFlexItem--flexBasisAuto': !basis, // use flex-basis: auto
[`ouiFlexItem--flexGrow${grow}`]: // use flex-grow: {grow} and flex-basis: auto
// use flex-grow: 0 and flex-basis: auto
'ouiFlexItem--flexGrowZero': !grow,
// use flex-shrink: 0 and flex-basis: auto
'ouiFlexItem--flexShrinkZero': !shrink,
// use flex-basis: auto
'ouiFlexItem--flexBasisAuto': !basis,
// use flex-grow: {grow} and flex-basis: auto
[`ouiFlexItem--flexGrow${grow}`]:
typeof grow === 'number' ? GROW_SIZES.indexOf(grow) >= 0 : undefined,
// use flex-shrink: {shrink} and flex-basis: auto
[`ouiFlexItem--flexShrink${shrink}`]:
typeof shrink === 'number' // use flex-shrink: {shrink} and flex-basis: auto
typeof shrink === 'number'
? SHRINK_SIZES.indexOf(shrink) >= 0
: undefined,
// use flex-basis: {basis}
[`ouiFlexItem--flexBasis-${basis}`]:
typeof basis === 'string' // use flex-basis: {basis}
typeof basis === 'string'
? BASIS_VALUES.indexOf(basis) >= 0
: undefined,
},
Expand Down

0 comments on commit 345fd2d

Please sign in to comment.