File tree Expand file tree Collapse file tree 4 files changed +17
-15
lines changed
containers/PageConstructor/__stories__ Expand file tree Collapse file tree 4 files changed +17
-15
lines changed Original file line number Diff line number Diff line change 145145 "items" : [
146146 {
147147 "text" : " Lorem ipsum " ,
148- "url" : " https://example.com"
148+ "url" : " https://example.com" ,
149+ "type" : " link"
149150 },
150151 {
151152 "text" : " Dolor sit amet" ,
152- "url" : " https://example.com"
153+ "url" : " https://example.com" ,
154+ "type" : " link"
153155 },
154156 {
155157 "text" : " Consectetur adipiscing" ,
156- "url" : " https://example.com"
158+ "url" : " https://example.com" ,
159+ "type" : " link"
157160 },
158161 {
159162 "text" : " Ut enim ad minim " ,
160- "url" : " https://example.com"
163+ "url" : " https://example.com" ,
164+ "type" : " link"
161165 }
162166 ]
163167 },
Original file line number Diff line number Diff line change 1+ import { ThemeSupporting } from '../utils' ;
12import { ImageProps , ButtonProps } from './constructor-items' ;
23
34export enum NavigationItemType {
@@ -50,16 +51,13 @@ export type NavigationItemData =
5051
5152export type DropdownItemData = Omit < NavigationDropdownItem , 'items' > ;
5253
53- export interface NavigationLogoThemedData {
54+ export interface NavigationLogoData {
5455 icon : ImageProps ;
5556 text ?: string ;
5657 url ?: string ;
5758}
5859
59- export interface NavigationLogoData extends NavigationLogoThemedData {
60- dark ?: NavigationLogoThemedData ;
61- light ?: NavigationLogoThemedData ;
62- }
60+ export type ThemedNavigationLogoData = NavigationLogoData & ThemeSupporting < NavigationLogoData > ;
6361
6462export interface HeaderData {
6563 leftItems : NavigationItemModel [ ] ;
@@ -83,7 +81,7 @@ export interface FooterData {
8381}
8482
8583export interface NavigationData {
86- logo : NavigationLogoData ;
84+ logo : ThemedNavigationLogoData ;
8785 header : HeaderData ;
8886 footer ?: FooterData ;
8987}
Original file line number Diff line number Diff line change 11import React , { MouseEvent , useCallback , useState } from 'react' ;
22
33import { block } from '../../../utils' ;
4- import { HeaderData , NavigationLogoData } from '../../../models' ;
4+ import { HeaderData , ThemedNavigationLogoData } from '../../../models' ;
55import { Col , Grid , Row } from '../../../grid' ;
66import OutsideClick from '../../../components/OutsideClick/OutsideClick' ;
77import Control from '../../../components/Control/Control' ;
@@ -19,7 +19,7 @@ const b = block('header');
1919const ICON_SIZE = 36 ;
2020
2121export interface HeaderProps {
22- logo : NavigationLogoData ;
22+ logo : ThemedNavigationLogoData ;
2323 data : HeaderData ;
2424}
2525
Original file line number Diff line number Diff line change 11import React , { useContext } from 'react' ;
22
33import { block , getThemedValue } from '../../../utils' ;
4- import { NavigationLogoData } from '../../../models' ;
4+ import { ThemedNavigationLogoData } from '../../../models' ;
55import RouterLink from '../../../components/RouterLink/RouterLink' ;
66import { getMediaImage } from '../../../components/Media/Image/utils' ;
77import { ThemeValueContext } from '../../../context/theme/ThemeValueContext' ;
@@ -11,9 +11,9 @@ import './Logo.scss';
1111
1212const b = block ( 'logo' ) ;
1313
14- export interface LogoProps extends NavigationLogoData {
14+ export type LogoProps = ThemedNavigationLogoData & {
1515 className ?: string ;
16- }
16+ } ;
1717
1818const Logo : React . FC < LogoProps > = ( props ) => {
1919 const { themeValue : theme } = useContext ( ThemeValueContext ) ;
You can’t perform that action at this time.
0 commit comments