@bonniernews/dn-design-system-web 20.5.1-beta.0 → 20.5.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,8 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
4
4
 
5
5
 
6
6
 
7
+ ## [20.5.1-beta.1](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@20.5.1-beta.0...@bonniernews/dn-design-system-web@20.5.1-beta.1) (2024-10-02)
8
+
7
9
  ## [20.5.1-beta.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@20.5.0...@bonniernews/dn-design-system-web@20.5.1-beta.0) (2024-10-02)
8
10
 
9
11
  ## [20.5.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@20.4.5...@bonniernews/dn-design-system-web@20.5.0) (2024-09-26)
@@ -0,0 +1,23 @@
1
+ export interface QuoteProps {
2
+ bodyHtml: string;
3
+ theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';
4
+ classNames?: string;
5
+ attributes?: object;
6
+ forcePx?: boolean;
7
+ }
8
+
9
+ export const Quote = ({ bodyHtml, theme = 'nyheter', classNames, attributes, forcePx }: QuoteProps) => {
10
+ const componentClassName = 'ds-quote';
11
+ const classes = [
12
+ componentClassName,
13
+ `ds-theme--${theme}`,
14
+ forcePx && 'ds-force-px',
15
+ classNames
16
+ ].filter(Boolean).join(' ');
17
+
18
+ const quoteHtml = `<span class="${componentClassName}__border"></span> ${bodyHtml}`
19
+
20
+ return (
21
+ <blockquote dangerouslySetInnerHTML={{ __html: quoteHtml }} className={classes} {...attributes} />
22
+ );
23
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonniernews/dn-design-system-web",
3
- "version": "20.5.1-beta.0",
3
+ "version": "20.5.1-beta.1",
4
4
  "description": "DN design system for web.",
5
5
  "main": "index.tsx",
6
6
  "type": "module",
@@ -0,0 +1,8 @@
1
+ export interface QuoteProps {
2
+ bodyHtml: string;
3
+ theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';
4
+ classNames?: string;
5
+ attributes?: object;
6
+ forcePx?: boolean;
7
+ }
8
+ export declare const Quote: ({ bodyHtml, theme, classNames, attributes, forcePx }: QuoteProps) => import("preact").JSX.Element;
@@ -0,0 +1,8 @@
1
+ export interface QuoteProps {
2
+ bodyHtml: string;
3
+ theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';
4
+ classNames?: string;
5
+ attributes?: object;
6
+ forcePx?: boolean;
7
+ }
8
+ export declare const Quote: ({ bodyHtml, theme, classNames, attributes, forcePx }: QuoteProps) => import("react/jsx-runtime").JSX.Element;