/
sdds
/
plasma
Обзор
Документация
Войти
/
sdds
/
plasma
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
dev
website/plasma-theme-builder/src/components/Error/Error.tsx
29 строк
668 B
Neretin Artem
feat(plasma-theme-builder): Add read theme from github repo
24 янв 2023, 13:49
24 янв 2023, 13:49
31ee804
Код
Авторство
О чём код?
import React from 'react'; import styled from 'styled-components'; import { Button } from '@salutejs/plasma-b2c'; const StyledError = styled.div``; const Description = styled.div` margin-top: 2rem; `; const StyledButton = styled(Button)` display: block; margin: 2rem 0; margin-left: auto; `; interface ErrorProps { message?: string; onMain: () => void; } export const Error = ({ onMain, message }: ErrorProps) => { return ( <StyledError> <Description>{message}</Description> <StyledButton view="primary" text="Вернуться на главную" onClick={onMain} /> </StyledError> ); };