overleaf/services/web/frontend/stories/history/toggle-switch.stories.tsx
ilkin-overleaf 867b37b76f Merge pull request #12417 from overleaf/ii-history-react-toggle-switch
[web] Toggle switch history migration

GitOrigin-RevId: c0812d03d576bc66dd8878fa80d4ac18dd8576d0
2023-03-30 08:04:22 +00:00

41 lines
883 B
TypeScript

import { useState } from 'react'
import ToggleSwitchComponent from '../../js/features/history/components/change-list/toggle-switch'
export const LabelsOnlyToggleSwitch = () => {
const [labelsOnly, setLabelsOnly] = useState(false)
return (
<ToggleSwitchComponent
labelsOnly={labelsOnly}
setLabelsOnly={setLabelsOnly}
/>
)
}
export default {
title: 'History / Change list',
component: ToggleSwitchComponent,
argTypes: {
labelsOnly: {
table: {
disable: true,
},
},
setLabelsOnly: {
table: {
disable: true,
},
},
},
decorators: [
(Story: React.ComponentType) => (
<div className="history-react">
<div className="change-list">
<div className="history-header toggle-switch-container">
<Story />
</div>
</div>
</div>
),
],
}