|
| 1 | +import type { Meta, StoryObj } from '@storybook/react' |
| 2 | +import { Article } from '~/components/blocks' |
| 3 | + |
| 4 | +const meta: Meta<typeof Article> = { |
| 5 | + title: 'Blocks/Article', |
| 6 | + component: Article, |
| 7 | + parameters: { |
| 8 | + layout: 'fullscreen', |
| 9 | + }, |
| 10 | + tags: ['autodocs'], |
| 11 | + argTypes: { |
| 12 | + title: { control: 'text' }, |
| 13 | + summary: { control: 'text' }, |
| 14 | + content: { control: 'text' }, |
| 15 | + image: { control: 'object' }, |
| 16 | + tags: { control: 'object' }, |
| 17 | + publishDate: { control: 'date' }, |
| 18 | + author: { control: 'object' }, |
| 19 | + }, |
| 20 | + args: { |
| 21 | + title: 'How designers estimate the impact of UX?', |
| 22 | + summary: 'Designers wear many hats, the first one being a moderator.', |
| 23 | + content: ` |
| 24 | + <p>Designers aren't purely focused on aesthetics — their role encompasses broader business aspects and technology, while carefully evaluating those by estimating the return on investment for each solution.</p> |
| 25 | + <p>In short, designers ensure that the end value of the specific solution, or product as a whole, brings gains to the client's business as expected and a significant return against the initial investment.</p> |
| 26 | + <h3>Core Areas of Focus</h3> |
| 27 | + <p>At intive, our designers maintain this awareness by developing across three core areas:</p> |
| 28 | + <ul> |
| 29 | + <li>Business</li> |
| 30 | + <li>Technology</li> |
| 31 | + <li>User-centric design practices</li> |
| 32 | + </ul> |
| 33 | + <p>For each vertical, they keep ROI in mind, taking care to estimate and realize the impact of UX on the client's budget, goals, and wider technical framework.</p> |
| 34 | + `, |
| 35 | + image: { |
| 36 | + src: '/placeholders/drupal-decoupled/landscape-large.png', |
| 37 | + alt: 'A cartoon character on a beach with an ice cream', |
| 38 | + }, |
| 39 | + tags: ['UX', 'Design', 'Business'], |
| 40 | + publishDate: 1667260800, |
| 41 | + author: { |
| 42 | + avatar: { |
| 43 | + src: '/placeholders/doc-tahedroid/avatar.png', |
| 44 | + name: 'Doc Tahedroid', |
| 45 | + }, |
| 46 | + name: 'Doc Tahedroid', |
| 47 | + }, |
| 48 | + }, |
| 49 | +} |
| 50 | + |
| 51 | +export default meta |
| 52 | +type Story = StoryObj<typeof Article> |
| 53 | + |
| 54 | +export const Default: Story = {} |
| 55 | + |
| 56 | +export const WithoutSummary: Story = { |
| 57 | + args: { |
| 58 | + summary: undefined, |
| 59 | + }, |
| 60 | +} |
| 61 | + |
| 62 | +export const WithoutTags: Story = { |
| 63 | + args: { |
| 64 | + tags: undefined, |
| 65 | + }, |
| 66 | +} |
| 67 | + |
| 68 | +export const LongTitle: Story = { |
| 69 | + args: { |
| 70 | + title: |
| 71 | + 'This is a very long title that should wrap to multiple lines in the article component', |
| 72 | + }, |
| 73 | +} |
| 74 | + |
| 75 | +export const ShortContent: Story = { |
| 76 | + args: { |
| 77 | + content: '<p>This is a short article content.</p>', |
| 78 | + }, |
| 79 | +} |
| 80 | + |
| 81 | +export const DifferentDate: Story = { |
| 82 | + args: { |
| 83 | + publishDate: 1684108800, |
| 84 | + }, |
| 85 | +} |
0 commit comments