mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-29 05:51:26 +08:00
- Introduced a new UI component library for Cherry Studio, including various components such as buttons, inputs, and layout elements. - Updated configuration files to include the new library and its dependencies. - Enhanced the project structure to support modular imports and TypeScript definitions for better development experience.
38 lines
777 B
TypeScript
38 lines
777 B
TypeScript
// Original: src/renderer/src/components/DividerWithText.tsx
|
|
import React, { CSSProperties } from 'react'
|
|
import styled from 'styled-components'
|
|
|
|
interface DividerWithTextProps {
|
|
text: string
|
|
style?: CSSProperties
|
|
}
|
|
|
|
const DividerWithText: React.FC<DividerWithTextProps> = ({ text, style }) => {
|
|
return (
|
|
<DividerContainer style={style}>
|
|
<DividerText>{text}</DividerText>
|
|
<DividerLine />
|
|
</DividerContainer>
|
|
)
|
|
}
|
|
|
|
const DividerContainer = styled.div`
|
|
display: flex;
|
|
align-items: center;
|
|
margin: 0px 0;
|
|
`
|
|
|
|
const DividerText = styled.span`
|
|
font-size: 12px;
|
|
color: var(--color-text-2);
|
|
margin-right: 8px;
|
|
`
|
|
|
|
const DividerLine = styled.div`
|
|
flex: 1;
|
|
height: 1px;
|
|
background-color: var(--color-border);
|
|
`
|
|
|
|
export default DividerWithText
|