mirror of
https://github.com/overleaf/overleaf.git
synced 2024-09-16 02:52:31 -04:00
42 lines
883 B
TypeScript
42 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>
|
||
|
),
|
||
|
],
|
||
|
}
|