/** ******************************************************************************************************************* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. * ******************************************************************************************************************** */ import React, { useState } from 'react'; import ExpandableSection from '.'; import Badge from '../Badge'; import Box from '../../layouts/Box'; import Button from '../Button'; import Select, { SelectOption } from '../Select'; import Heading from '../Heading'; const options = [ { label: 'Student', value: 'status' }, { label: 'Lecturer', value: 'lecture' }, { label: 'Admin', value: 'admin' }, ]; export default { component: ExpandableSection, title: 'Components/ExpandableSection', }; export const Default = () => Expandable content; export const Borderless = () => ( Expandable content ); export const Container = () => ( Expandable content ); export const WithActionButton = () => { const header = ( Current view: ); return ( Expandable content ); }; export const Complex = () => { const [selectedOption, setSeletedOption] = useState(options[0]); const onChange = (event: React.ChangeEvent<{ value: any }>) => { setSeletedOption(options.find((o) => o.value === String(event.target.value))); }; const header = ( Current view: ); return (