import React, { useState } from 'react';
import SideSheet from '../index';
import { Select, Button, Tooltip, RadioGroup, Radio } from '../../index';
export default {
title: 'SideSheet',
parameters: {
chromatic: { disableSnapshot: true },
},
}
const BasicSide = props => {
const [visible, setVisible] = useState(false);
const handleCancel = e => {
console.log('cancelling');
setVisible(false);
};
return (
12333
);
};
export const SideSheetLeft = () => ;
SideSheetLeft.story = {
name: 'side sheet left',
};
const PosBasicSide = props => {
const [visible, setVisible] = useState(false);
const handleCancel = e => {
setVisible(false);
};
return (
12333
);
};
export const _SideSheet = () => ;
_SideSheet.story = {
name: 'side sheet',
};
const SideMask = props => {
const [visible, setVisible] = useState(false);
const handleCancel = e => {
setVisible(false);
};
return (
12333
);
};
export const SideSheetMask = () => ;
SideSheetMask.story = {
name: 'side sheet mask',
};
const Test2 = () => {
const [visible, setVisible] = useState(false);
const [visible2, setVisible2] = useState(false);
const handleCancel = e => {
setVisible(false);
};
const handleCancel2 = e => {
setVisible2(false);
};
return (
<>
>
);
};
export const SidesheetInSidesheet = () => ;
SidesheetInSidesheet.story = {
name: 'sidesheet in sidesheet',
};
const Blocking = () => {
const [visible, setVisible] = useState(false);
const [placement, setPlacement] = useState('right');
const handleCancel = e => {
setVisible(false);
};
const show = () => {
setVisible(true);
};
const onSelect = e => {
setPlacement(e.target.value);
};
return (
<>
onSelect(e)} value={placement}>
right
left
top
bottom
jklasjdkfljaskljdfklajksdljfkl;ajklsdjfk;lajksldjfklajskdlfjajsdlf;jaklsjdfkljaklsdjflajsdfjakljsdkl;fja;sd
handleCancel()}
mask={false}
>
This is the content of a basic sidesheet.
Here is more content...
>
);
};
export const SidesheetNonBlocking = () => ;
SidesheetNonBlocking.story = {
name: 'sidesheet non-blocking',
};
const Popup = () => {
const [visible, setVisible] = useState(false);
const [placement, setPlacement] = useState('right');
const handleCancel = e => {
setVisible(false);
};
const onSelect = e => {
setPlacement(e.target.value);
};
return (
Render in this
onSelect(e)} value={placement}>
right
left
top
bottom
document.querySelector('.sidesheet-container')}
>
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
);
};
export const SidesheetGetpopupcontanier = () => ;
SidesheetGetpopupcontanier.story = {
name: 'sidesheet getpopupcontanier',
};
const Combox = () => {
const [visible, setVisible] = useState(false);
const [placement, setPlacement] = useState('right');
const handleCancel = e => {
setVisible(false);
};
const onSelect = e => {
setPlacement(e.target.value);
};
return (
Render in this
onSelect(e)} value={placement}>
right
left
top
bottom
document.querySelector('.sidesheet-container')}
>
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
);
};
export const SidesheetGetpopupcontanierAndNonBlocking = () => ;
SidesheetGetpopupcontanierAndNonBlocking.story = {
name: 'sidesheet getpopupcontanier and non-blocking',
};
const WithFooter = () => {
const [visible, setVisible] = useState(false);
const handleCancel = e => {
setVisible(false);
};
const show = () => {
setVisible(true);
};
return (
1234
}
placement={'right'}
onCancel={handleCancel}
// bodyStyle={{ overflow: 'auto', height: 200 }}
>
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
Some contents...
);
};
export const _WithFooter = () => ;
_WithFooter.story = {
name: 'WithFooter',
};
const MaskFalseDemo = () => {
const [visible, setVisible] = useState(false);
const handleCancel = e => {
setVisible(false);
};
const show = () => {
setVisible(true);
};
return (
Some contents...
Some contents...
Some contents...
Some contents...
);
};
export const WidthPercentMaskFalse = () => ;
WidthPercentMaskFalse.story = {
name: 'width percent & mask=false',
};