-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
106 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import type { Meta, StoryObj } from "@storybook/html"; | ||
import { Alert, type AlertProps } from "./alert"; | ||
import i18n from "../i18n"; | ||
|
||
const meta: Meta<AlertProps> = { | ||
title: "alert", | ||
tags: ["autodocs"], | ||
render: Alert, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<AlertProps>; | ||
|
||
export const Info: Story = { | ||
args: { | ||
variant: "info", | ||
content: i18n("security_level_info"), | ||
}, | ||
}; | ||
|
||
export const Danger: Story = { | ||
args: { | ||
variant: "error", | ||
content: i18n("notifications_error"), | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
import html from "decorator-shared/html"; | ||
import { Alert } from "decorator-shared/views/alert"; | ||
import i18n from "../../i18n"; | ||
import { Alert } from "../alert"; | ||
|
||
// TODO: add texts/translations | ||
export const NotificationsErrorView = () => { | ||
return html`${Alert({ | ||
export const NotificationsErrorView = () => | ||
Alert({ | ||
variant: "error", | ||
content: html` <div>Åh nei, kunne ikke laste varsler!</div>`, | ||
})}`; | ||
}; | ||
content: i18n("notifications_error"), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
import html from "decorator-shared/html"; | ||
import { Alert } from "decorator-shared/views/alert"; | ||
import i18n from "../../i18n"; | ||
import { Alert } from "../alert"; | ||
|
||
// TODO: add texts/translations | ||
export const SearchErrorView = () => { | ||
return html`${Alert({ | ||
export const SearchErrorView = () => | ||
Alert({ | ||
variant: "error", | ||
content: html` <div>Åh nei, søket feilet!</div>`, | ||
})}`; | ||
}; | ||
content: i18n("search_error"), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** | ||
* Config for typescript-plugin-css-modules. | ||
* It doesn't support async, so we need to use postcss-import-sync2. | ||
*/ | ||
module.exports = { plugins: { "postcss-import-sync2": {} } }; |