/
hey_yo
/
Notebook
Обзор
Документация
Войти
/
hey_yo
/
Notebook
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/pages/UserProfile/UserProfile.styles.js
100 строк
3 KB
mike.r
learn(styled.emotion): стилизация, доработки, структура
06 май 2026, 16:24
06 май 2026, 16:24
146d71e
Код
Авторство
О чём код?
import styled from "@emotion/styled"; export const Container = styled.div` max-width: 600px; margin: 0 auto; padding: ${props => props.theme.spacing.xl}; `; export const Card = styled.div` background-color: ${props => props.theme.colors.surface}; border-radius: ${props => props.theme.borderRadius.lg}; padding: ${props => props.theme.spacing.xl}; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); text-align: center; `; export const Avatar = styled.div` width: 100px; height: 100px; border-radius: 50%; background-color: ${props => props.theme.colors.primary}; color: white; display: flex; align-items: center; justify-content: center; font-size: 48px; margin: 0 auto ${props => props.theme.spacing.lg}; `; export const Name = styled.h1` color: ${props => props.theme.colors.text}; margin-bottom: ${props => props.theme.spacing.md}; `; export const Status = styled.div` display: inline-block; padding: ${props => props.theme.spacing.xs} ${props => props.theme.spacing.md}; background-color: ${props => props.isOnline ? props.theme.colors.online : props.theme.colors.offline}; color: white; border-radius: ${props => props.theme.borderRadius.sm}; font-size: 14px; font-weight: bold; margin-bottom: ${props => props.theme.spacing.lg}; `; export const Detail = styled.div` text-align: left; margin-top: ${props => props.theme.spacing.lg}; padding-top: ${props => props.theme.spacing.lg}; border-top: 1px solid ${props => props.theme.colors.border}; ` export const DetailRow = styled.div` display: flex; justify-content: space-between; padding: ${props => props.theme.spacing.sm} 0; border-bottom: 1px solid ${props => props.theme.colors.border}; &:last-child { border-bottom: none; } ` export const DetailLabel = styled.span` font-weight: bold; color: ${props => props.theme.colors.textSecondary}; ` export const DetailValue = styled.span` color: ${props => props.theme.colors.text}; ` export const BackButton = styled.button` margin-top: ${props => props.theme.spacing.lg}; padding: ${props => `${props.theme.spacing.sm} ${props.theme.spacing.lg}`}; background-color: ${props => props.theme.colors.primary}; color: white; border: none; border-radius: ${props => props.theme.borderRadius.sm}; cursor: pointer; transition: background-color 0.2s; &:hover { background-color: ${props => props.theme.colors.primaryHover}; } ` export const LoadingText = styled.div` text-align: center; padding: ${props => props.theme.spacing.xl}; color: ${props => props.theme.colors.textSecondary}; ` export const ErrorText = styled.div` text-align: center; padding: ${props => props.theme.spacing.xl}; color: ${props => props.theme.colors.error}; `