Story 컨트롤
컨트롤 타입 설정


컨트롤 목록
속성 문서 표시

No Controls 경고
Last updated



Last updated
const Basic = Template.bind({});
Basic.args = {
backgroundColor: '#e00',
};export default {
title: 'Button',
component: Button,
argTypes: {
// 배경 색상을 선택할 수 있는 컬러 피커 컨트롤 설정
backgroundColor: { control: 'color' },
},
}export default {
// ...
argTypes: {
// 컨트롤 할 속성
loadingState: {
control: {
type: 'inline-radio',
options: ['idle', 'pending', 'resolved', 'rejected'],
},
},
},
}export default {
// ...
argTypes: {
// 컨트롤 할 속성
width: {
control: {
type: 'range',
min: 400, max: 1200, step: 50
},
},
},
}export default {
// ...
argTypes: {
// 컨트롤 할 속성
type: {
control: {
type: 'select',
options: ['color', 'mono', 'black'],
}
},
},
}export const parameters = {
controls: { expanded: true },
};export const Large = Template.bind({});
Large.parameters = {
controls: { hideNoControlsWarning: true },
};