init project
Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled

This commit is contained in:
how2ice
2025-12-12 14:26:25 +09:00
commit 005cf56baf
43188 changed files with 1079531 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import Avatar from '@mui/material/Avatar';
import Box from '@mui/material/Box';
import SpeedDial from '@mui/material/SpeedDial';
import SpeedDialIcon from '@mui/material/SpeedDialIcon';
import SpeedDialAction from '@mui/material/SpeedDialAction';
function SimpleSpeedDial(props) {
const tooltipPlacement = {
up: 'left',
right: 'top',
down: 'right',
left: 'bottom',
};
return (
<SpeedDial icon={<SpeedDialIcon />} open {...props}>
{['A', 'B', 'C'].map((name) => (
<SpeedDialAction
key={name}
icon={<Avatar>{name}</Avatar>}
tooltipOpen
tooltipPlacement={tooltipPlacement[props.direction]}
tooltipTitle={'Tooltip'}
/>
))}
</SpeedDial>
);
}
SimpleSpeedDial.propTypes = {
direction: PropTypes.string.isRequired,
};
function Directions() {
return (
<Box sx={{ position: 'relative', height: 360, width: 400 }}>
{['up', 'down'].map((direction) => (
<SimpleSpeedDial
sx={{
position: 'absolute',
...(direction === 'up' && { bottom: 0, right: 0 }),
...(direction === 'down' && { top: 0, left: 0 }),
}}
key={direction}
ariaLabel={direction}
direction={direction}
/>
))}
</Box>
);
}
export default Directions;