clippedBox.stories.js 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. import ClippedBox from 'sentry/components/clippedBox';
  2. export default {
  3. title: 'Utilities/Hidden Content/Clipped Box',
  4. component: ClippedBox,
  5. args: {
  6. title: 'Clipped Box Title',
  7. clipHeight: 60,
  8. btnText: 'expand',
  9. defaultClipped: true,
  10. },
  11. argTypes: {
  12. onReveal: {action: 'onReveal'},
  13. },
  14. };
  15. export const Default = ({...args}) => (
  16. <div>
  17. <div>
  18. <ClippedBox {...args}>
  19. Tilde taiyaki lumbersexual, franzen gochujang forage mixtape meditation mumblecore
  20. af food truck etsy butcher. Post-ironic taiyaki affogato, artisan biodiesel
  21. kickstarter direct trade try-hard tacos subway tile swag vice trust fund shaman
  22. whatever. Everyday carry cliche lomo, bicycle rights vaporware tbh meditation
  23. occupy bespoke. Meh green juice enamel pin thundercats, aesthetic intelligentsia
  24. hoodie fanny pack venmo. Kale chips tacos activated charcoal pinterest tousled
  25. hoodie 8-bit occupy distillery. Tote bag godard thundercats small batch banjo, DIY
  26. waistcoat. Glossier poutine VHS put a bird on it listicle deep v letterpress. Tbh
  27. banjo paleo cred hoodie. Live-edge synth twee, subway tile coloring book woke swag
  28. XOXO cornhole glossier neutra hell of lo-fi brooklyn actually. Retro beard
  29. jianbing, shoreditch kitsch banh mi flexitarian mustache cold-pressed. Sriracha af
  30. brooklyn, poutine snackwave taxidermy ugh locavore mlkshk shaman before they sold
  31. out +1. Microdosing copper mug edison bulb, synth tote bag man braid heirloom.
  32. Cray tattooed portland, echo park sustainable gluten-free chartreuse hexagon.
  33. Pitchfork fixie keffiyeh mustache +1 vinyl, cliche pok pok vegan hashtag live-edge
  34. williamsburg wayfarers butcher beard.
  35. </ClippedBox>
  36. </div>
  37. </div>
  38. );
  39. Default.storyName = 'Clipped Box';
  40. Default.parameters = {
  41. docs: {
  42. description: {
  43. story: 'Component that clips content and allows expansion of container',
  44. },
  45. },
  46. };
  47. export const ClipFlex = () => (
  48. <div>
  49. <div>
  50. With clipFlex off, show more is hardly hiding anything
  51. <ClippedBox clipHeight={100} clipFlex={0}>
  52. <div style={{backgroundColor: 'SeaGreen', height: '80px'}} />
  53. </ClippedBox>
  54. With clipFlex on (component should be expanded)
  55. <ClippedBox clipHeight={100}>
  56. <div style={{backgroundColor: 'SeaGreen', height: '80px'}} />
  57. </ClippedBox>
  58. </div>
  59. </div>
  60. );
  61. ClipFlex.storyName = 'Clipped Box Flex';
  62. ClipFlex.parameters = {
  63. docs: {
  64. description: {
  65. story: 'Demo showing a component that is only slightly larger than the clipHeight',
  66. },
  67. },
  68. };