svipulc / Evoke-ui

Evoke UI is a modern, flexible, and highly customizable component library built with TypeScript and Vite. It is designed to help developers create beautiful, responsive, and accessible user interfaces with minimal effort.
https://www.npmjs.com/package/@social-media/evoke-ui
2 stars 0 forks source link

feat: sm-75 create divider component #20

Closed Suryansh-Simform closed 1 month ago

Suryansh-Simform commented 2 months ago

Description

This pull request introduces a flexible and customizable Divider component. The Divider enhances content separation and visual organization across the application, supporting multiple variants for styling, alignment, and orientation.

Features

Divider_example_1 Divider_example_4 Divider_Example_2 Divider_Example_3

VatsalDave2102 commented 2 months ago

Could we go for a better naming convention for textAlign options that are left, right and center. For horizontal variant they seem perfect but for vertical, they create confusion. We can have top, bottom and center for that. This is achievable using discriminated unions in typescript.

Suryansh-Simform commented 2 months ago

Could we go for a better naming convention for textAlign options that are left, right and center. For horizontal variant they seem perfect but for vertical, they create confusion. We can have top, bottom and center for that. This is achievable using discriminated unions in typescript.

@VatsalDave2102 You're right, we could use options like top, right, and left—I considered this as well. However, if you look at examples like Material UI and Ant Design etc, they don’t offer text-align options like top, bottom, or center for vertical alignment. Screenshot from 2024-09-30 10-17-29 Screenshot from 2024-09-30 10-30-48

but if you want I can take a look and try to implement as you mentioned

VatsalDave2102 commented 2 months ago

@VatsalDave2102 You're right, we could use options like top, right, and left—I considered this as well. However, if you look at examples like Material UI and Ant Design etc, they don’t offer text-align options like top, bottom, or center for vertical alignment.

You're correct, they have not provided options for top and bottom. But they also have not implemented the styles for that in vertical orientation. i.e.

<Divider textAlign="left" orientation="vertical">Content</Divider>

The Content would stay in center even though we have given text align left. On the other hand, we have implemented styles for vertical orientation. Hence I suggested to have a better naming convention. Or else we could also follow a similar pattern like MUI, to not provide styles for vertical orientation.

Suryansh-Simform commented 2 months ago

@VatsalDave2102 You're right, we could use options like top, right, and left—I considered this as well. However, if you look at examples like Material UI and Ant Design etc, they don’t offer text-align options like top, bottom, or center for vertical alignment.

You're correct, they have not provided options for top and bottom. But they also have not implemented the styles for that in vertical orientation. i.e.

<Divider textAlign="left" orientation="vertical">Content</Divider>

The Content would stay in center even though we have given text align left. On the other hand, we have implemented styles for vertical orientation. Hence I suggested to have a better naming convention. Or else we could also follow a similar pattern like MUI, to not provide styles for vertical orientation.

@VatsalDave2102 Agreed will implement the changes

github-actions[bot] commented 1 month ago

:tada: This issue has been resolved in version 1.12.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: