Skip to content

Commit

Permalink
add pc & leading page link key names
Browse files Browse the repository at this point in the history
  • Loading branch information
martyanovandrey authored and 3y3 committed Mar 25, 2024
1 parent 6903d74 commit 18c15af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ export enum TextDirection {
RTL = 'rtl',
LTR = 'ltr',
}

export const LINK_KEYS_LEADING_CONFIG = ['href']
export const LINK_KEYS_PAGE_CONSTRUCTOR_CONFIG = ['src','url','href','icon','image','desktop','mobile','tablet','previewImg','image', 'avatar', 'logo', 'light', 'dark']

export const LINK_KEYS = [...new Set([...LINK_KEYS_LEADING_CONFIG, ...LINK_KEYS_PAGE_CONSTRUCTOR_CONFIG])]
2 changes: 2 additions & 0 deletions src/index.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import React from 'react';
import {renderToString} from 'react-dom/server';

import {App, DocInnerProps, DocLeadingPageData, DocPageData} from './components/App/App';
import {LINK_KEYS} from './constants';

export type {DocInnerProps, DocPageData, DocLeadingPageData};
export {LINK_KEYS};

export const render = (props: DocInnerProps) => renderToString(<App {...props} />);

0 comments on commit 18c15af

Please sign in to comment.