overleaf/services/web/frontend/stories/history/toggle-switch.stories.tsx
ilkin-overleaf 8e0aa685ce Merge pull request #12549 from overleaf/ii-history-react-list-of-all-versions
[web] All versions of history entries

GitOrigin-RevId: 7365ac4913c115b3b2872a3713d893463719c15e
2023-04-12 08:03:47 +00:00

41 lines
891 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 history-toggle-switch-container">
<Story />
</div>
</div>
</div>
),
],
}