OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Add Divider stories
Benjamin Bädorf92587f5d38aa
diff --git a/frontend/src/stories/Divider.example.html b/frontend/src/stories/Divider.example.htmlnew file mode 100644index 00000000000..95297a98d99--- /dev/null+++ b/frontend/src/stories/Divider.example.html@@ -0,0 +1,8 @@+<div class="spot-container">+ <h1 class="spot-subheader-small">Some header with a soft divider below</h1>+ <div class="spot-divider"></div>+ <p class="spot-body-big">+ Lorem ipsum goes here but I'm too lazy to copy paste it from somewhere so I'll just ramble on+ until I think it has been enough. That was a very long sentence so I'll do one shorter one. Blablabla is what I say.+ </p>+</div>diff --git a/frontend/src/stories/Divider.example.ts b/frontend/src/stories/Divider.example.tsnew file mode 100644index 00000000000..360e3cc276e--- /dev/null+++ b/frontend/src/stories/Divider.example.ts@@ -0,0 +1,6 @@+import { Component } from '@angular/core';++@Component({+ templateUrl: './Divider.example.html',+})+export class SbDividerExample { }diff --git a/frontend/src/stories/Divider.stories.mdx b/frontend/src/stories/Divider.stories.mdxindex 93eaf01273f..61556f271ed 100644--- a/frontend/src/stories/Divider.stories.mdx+++ b/frontend/src/stories/Divider.stories.mdx@@ -1,5 +1,7 @@import { Meta, Story, Canvas } from '@storybook/addon-docs';-import tokens from '../app/spot/styles/tokens/dist/tokens.json';++import { SbDividerSoftExample } from './DividerSoft.example';+import { SbDividerStrongExample } from './DividerStrong.example';<Meta title="Components/Divider" />@@ -27,14 +29,20 @@ A divider can be soft or strong. The correct one to use depends on the structure1 px, Grey-5 (#E0E0E0)-> Example+<Canvas>+ <Story name="Soft">+ {{ component: SbDividerSoftExample }}+ </Story>+</Canvas>**Strong**1px, Grey-4 (#CCCCCC)-_Example: In the work package details view, the main three-way split (top header, left-side description, right-side split screen) is done using strong dividers, but on the Activity tab, dates are separated with soft ones._--## Margins and Spacing+<Canvas>+ <Story name="Strong">+ {{ component: SbDividerStrongExample }}+ </Story>+</Canvas>-The divider itself does inherently have margin and spacing. They can however be given margins within containing elements (like a modal) if necessary.\ No newline at end of file+_Example: In the work package details view, the main three-way split (top header, left-side description, right-side split screen) is done using strong dividers, but on the Activity tab, dates are separated with soft ones._diff --git a/frontend/src/stories/DividerSoft.example.html b/frontend/src/stories/DividerSoft.example.htmlnew file mode 100644index 00000000000..95297a98d99--- /dev/null+++ b/frontend/src/stories/DividerSoft.example.html@@ -0,0 +1,8 @@+<div class="spot-container">+ <h1 class="spot-subheader-small">Some header with a soft divider below</h1>+ <div class="spot-divider"></div>+ <p class="spot-body-big">+ Lorem ipsum goes here but I'm too lazy to copy paste it from somewhere so I'll just ramble on+ until I think it has been enough. That was a very long sentence so I'll do one shorter one. Blablabla is what I say.+ </p>+</div>diff --git a/frontend/src/stories/DividerSoft.example.ts b/frontend/src/stories/DividerSoft.example.tsnew file mode 100644index 00000000000..c430b5964d4--- /dev/null+++ b/frontend/src/stories/DividerSoft.example.ts@@ -0,0 +1,6 @@+import { Component } from '@angular/core';++@Component({+ templateUrl: './DividerSoft.example.html',+})+export class SbDividerSoftExample { }diff --git a/frontend/src/stories/DividerStrong.example.html b/frontend/src/stories/DividerStrong.example.htmlnew file mode 100644index 00000000000..4b0a838e6ec--- /dev/null+++ b/frontend/src/stories/DividerStrong.example.html@@ -0,0 +1,8 @@+<div class="spot-container">+ <h1 class="spot-subheader-small">Strong divider below</h1>+ <div class="spot-divider spot-divider_strong"></div>+ <p class="spot-body-big">+ Lorem ipsum goes here but I'm too lazy to copy paste it from somewhere so I'll just ramble on+ until I think it has been enough. That was a very long sentence so I'll do one shorter one. Blablabla is what I say.+ </p>+</div>diff --git a/frontend/src/stories/DividerStrong.example.ts b/frontend/src/stories/DividerStrong.example.tsnew file mode 100644index 00000000000..a7ebae0c4b5--- /dev/null+++ b/frontend/src/stories/DividerStrong.example.ts@@ -0,0 +1,6 @@+import { Component } from '@angular/core';++@Component({+ templateUrl: './DividerStrong.example.html',+})+export class SbDividerStrongExample { }