mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
8e0aa685ce
[web] All versions of history entries GitOrigin-RevId: 7365ac4913c115b3b2872a3713d893463719c15e
41 lines
891 B
TypeScript
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>
|
|
),
|
|
],
|
|
}
|