Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sliding Component #209

Merged
merged 22 commits into from
Jun 3, 2024
Merged

Sliding Component #209

merged 22 commits into from
Jun 3, 2024

Conversation

DominMFD
Copy link
Contributor

@DominMFD DominMFD commented May 3, 2024

Closes #94

Feature

Componente de Sliding criado com algumas funcionalidades.

Visual evidences 🖼️

image

sliding_normal.mp4
sliding_infinite.mp4
Checklist
  • Issue linked
  • Build working correctly
  • Tests created
Additional info

Componente de Sliding

O componente de sliding permite que o usuário navegue por entre diferentes conteúdos por meio de botões clicáveis ou por meio de swipping.

Propriedades

O componente recebe um array de itens que são os elementos que vão fazer parte do slide, também recebe mais duas propriedades:

  • loopMode: recebe uma string que define se o loop do sliding vai ser normal, ou seja parar na extremidades, ou vai ser infinite.
  • controls: recebe um boolean que define se vai ter os botões clicáveis ou não.

Funcionalidades programáticas

O sliding tem algumas funções para seu uso de forma programática:

  • addItem(): Adiciona o item passado por parâmetro ao componente;
  • removeItem(): Remove do componente o item passado por parâmetro;
  • setSlide(): Seleciona um item de forma programática;
  • next(): Passa para o próximo item;
  • prev(): Volta para o item anterior;
  • setControls(): Muda a definição dos controles;
  • setLoopMode(): Muda o loopMode;
  • clearItems(): Limpa os itens do componente;

@DominMFD DominMFD changed the title feat: sliding component create Sliding Component May 3, 2024
src/components/Sliding/index.js Outdated Show resolved Hide resolved
src/components/Sliding/index.js Outdated Show resolved Hide resolved
src/components/Sliding/index.js Outdated Show resolved Hide resolved
@hxsggsz
Copy link
Contributor

hxsggsz commented May 7, 2024

tem que ver o ci ai de eslint que ta quebrado tambem

Copy link
Contributor

@Alecell Alecell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vamos conversar!!

src/components/Sliding/index.js Outdated Show resolved Hide resolved
src/components/Sliding/index.js Outdated Show resolved Hide resolved
src/components/Sliding/index.js Outdated Show resolved Hide resolved
src/components/Sliding/index.js Outdated Show resolved Hide resolved
src/components/Sliding/index.js Show resolved Hide resolved
src/components/Sliding/index.scss Outdated Show resolved Hide resolved
src/components/Sliding/index.scss Outdated Show resolved Hide resolved
src/components/Sliding/index.scss Outdated Show resolved Hide resolved
src/components/Sliding/index.spec.js Show resolved Hide resolved
src/stories/Sliding.stories.js Outdated Show resolved Hide resolved
Copy link
Contributor

@Alecell Alecell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tenho alguns comentarios e perguntas, mas no geral ta muito bom, eficiente e sucinto, tudo que um componente precisa ser, parabens!

O storybook precisa ter alguns controles pra podermos manusear o slider

Vc ta lidando demais com a width do slider, porque isso é tao necessario? Queria entender a lógica que vc usou pra esse slider, nao to falando que ta errada, só que eu preciso entender mesmo

src/components/Sliding/index.js Outdated Show resolved Hide resolved
src/components/Sliding/index.js Outdated Show resolved Hide resolved
src/components/Sliding/index.js Outdated Show resolved Hide resolved
src/components/Sliding/index.js Outdated Show resolved Hide resolved
src/components/Sliding/index.js Outdated Show resolved Hide resolved
src/components/Sliding/index.js Outdated Show resolved Hide resolved
src/components/Sliding/index.js Outdated Show resolved Hide resolved
src/components/Sliding/index.js Outdated Show resolved Hide resolved
src/components/Sliding/index.js Outdated Show resolved Hide resolved
src/components/Sliding/index.js Show resolved Hide resolved
src/components/Sliding/index.js Show resolved Hide resolved
src/components/Sliding/index.spec.js Show resolved Hide resolved
src/components/Sliding/index.spec.js Outdated Show resolved Hide resolved
src/components/Sliding/index.spec.js Outdated Show resolved Hide resolved
src/components/Sliding/index.spec.js Outdated Show resolved Hide resolved
src/components/Sliding/index.spec.js Outdated Show resolved Hide resolved
src/components/Sliding/index.spec.js Outdated Show resolved Hide resolved
src/components/Sliding/index.spec.js Outdated Show resolved Hide resolved
src/components/Sliding/index.spec.js Outdated Show resolved Hide resolved
src/components/Sliding/index.spec.js Outdated Show resolved Hide resolved
src/components/Sliding/index.spec.js Outdated Show resolved Hide resolved
src/components/Sliding/index.spec.js Outdated Show resolved Hide resolved
@Alecell Alecell merged commit 61aaa7f into devhatt:main Jun 3, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Componente de Sliding
4 participants