Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
flexWrap: 'wrap',
alignItems: 'center',
'> * + *': {
marginLeft: 10,
},
}
: {}
);
const CheckboxFieldset = styled.fieldset({
border: 0,
padding: 0,
margin: 0,
});
const CheckboxLabel = styled.label({
padding: '3px 0 3px 5px',
lineHeight: '18px',
display: 'inline-block',
});
export default class CheckboxesType extends Component {
static defaultProps: CheckboxesTypeProps = {
knob: {} as any,
onChange: value => value,
isInline: false,
};
static propTypes: WeakValidationMap = {
// TODO: remove `any` once DefinitelyTyped/DefinitelyTyped#31280 has been resolved
knob: PropTypes.shape({
name: PropTypes.string,
import { styled, themes } from '@storybook/theming';
import { NodeResult, Result } from 'axe-core';
import { SizeMe } from 'react-sizeme';
import store, { clearElements } from '../redux-config';
import HighlightToggle from './Report/HighlightToggle';
import { RuleType } from './A11YPanel';
// TODO: reuse the Tabs component from @storybook/theming instead of re-building identical functionality
const Container = styled.div({
width: '100%',
position: 'relative',
minHeight: '100%',
});
const HighlightToggleLabel = styled.label<{}>(({ theme }) => ({
cursor: 'pointer',
userSelect: 'none',
marginBottom: 3,
marginRight: 3,
color: theme.color.dark,
}));
const GlobalToggle = styled.div(({ elementWidth }: { elementWidth: number }) => {
const maxWidthBeforeBreak = 450;
return {
cursor: 'pointer',
fontSize: '14px',
padding: elementWidth > maxWidthBeforeBreak ? '12px 15px 10px 0' : '12px 0px 3px 12px',
height: '40px',
border: 'none',
marginTop: elementWidth > maxWidthBeforeBreak ? -40 : 0,
}
const RadiosWrapper = styled.div(({ isInline }: RadiosWrapperProps) =>
isInline
? {
display: 'flex',
flexWrap: 'wrap',
alignItems: 'center',
'> * + *': {
marginLeft: 10,
},
}
: {}
);
const RadioLabel = styled.label({
padding: '3px 0 3px 5px',
lineHeight: '18px',
display: 'inline-block',
});
class RadiosType extends Component {
static defaultProps: RadiosTypeProps = {
knob: {} as any,
onChange: value => value,
isInline: false,
};
static propTypes: WeakValidationMap = {
// TODO: remove `any` once DefinitelyTyped/DefinitelyTyped#31280 has been resolved
knob: PropTypes.shape({
name: PropTypes.string,
import React, { FunctionComponent, ReactNode } from 'react';
import { styled } from '@storybook/theming';
const Wrapper = styled.label<{}>(({ theme }) => ({
display: 'flex',
borderBottom: `1px solid ${theme.appBorderColor}`,
margin: '0 15px',
padding: '8px 0',
'&:last-child': {
marginBottom: '3rem',
},
}));
const Label = styled.span<{}>(({ theme }) => ({
minWidth: 100,
fontWeight: theme.typography.weight.bold,
marginRight: 15,
display: 'flex',
justifyContent: 'flex-start',
fontSize: 12,
fontWeight: 'bolder',
color: 'rgb(130, 130, 130)',
border: '1px solid rgb(193, 193, 193)',
textAlign: 'center',
borderRadius: 2,
padding: 5,
cursor: 'pointer',
paddingLeft: 8,
margin: '0 0 0 5px',
backgroundColor: 'inherit',
verticalAlign: 'top',
outline: 0,
});
const Label = styled.label({
display: 'table-cell',
boxSizing: 'border-box',
verticalAlign: 'top',
paddingRight: 5,
paddingTop: 7,
textAlign: 'right',
width: 100,
fontWeight: '600',
} as any);
const Wrapper = styled.div({
display: 'flex',
padding: 5,
alignItems: 'flex-start',
boxSizing: 'border-box',
width: '100%',