Skip to content

Instantly share code, notes, and snippets.

@diego3g
Created May 21, 2020 21:29
Show Gist options
  • Star 32 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save diego3g/325d250596e923f6b6028576fcb684da to your computer and use it in GitHub Desktop.
Save diego3g/325d250596e923f6b6028576fcb684da to your computer and use it in GitHub Desktop.
.DayPicker {
background: #28262e;
border-radius: 10px;
}
.DayPicker-wrapper {
padding-bottom: 0;
}
.DayPicker,
.DayPicker-Month {
width: 100%;
}
.DayPicker-Month {
border-collapse: separate;
border-spacing: 8px;
margin: 16px;
}
.DayPicker-Day {
width: 40px;
height: 40px;
}
.DayPicker-Day--available:not(.DayPicker-Day--outside) {
background: #3e3b47;
border-radius: 10px;
color: #fff;
}
.DayPicker:not(.DayPicker--interactionDisabled)
.DayPicker-Day:not(.DayPicker-Day--disabled):not(.DayPicker-Day--selected):not(.DayPicker-Day--outside):hover {
background: ${shade(0.2, '#3e3b47')};
}
.DayPicker-Day--today {
font-weight: normal;
}
.DayPicker-Day--disabled {
color: #666360 !important;
background: transparent !important;
}
.DayPicker-Day--selected {
background: #ff9000 !important;
border-radius: 10px;
color: #232129 !important;
}
@sethwololo
Copy link

Versão com alguns ajustes extras pra tornar o calendário mais parecido com o do design no Figma

  .DayPicker {
    border-radius: 10px;
  }

  .DayPicker-wrapper {
    padding-bottom: 0;
    background: #3e3b47;
    border-radius: 10px;
  }

  .DayPicker,
  .DayPicker-Month {
    width: 100%;
  }

  .DayPicker-NavButton {
    color: #999591 !important;
  }

  .DayPicker-NavButton--prev {
    right: auto;
    left: 1.5em;
    margin-right: 0;
  }

  .DayPicker-Month {
    border-collapse: separate;
    border-spacing: 8px;
    margin: 16px 0 0 0;
    padding: 16px;
    background-color: #28262e;
    border-radius: 0 0 10px 10px;
  }

  .DayPicker-Caption {
    margin-bottom: 1em;
    padding: 0 1em;
    color: #f4ede8;

    > div {
      text-align: center;
    }
  }

  .DayPicker-Day {
    width: 40px;
    height: 40px;
  }

  .DayPicker-Day--available:not(.DayPicker-Day--outside) {
    background: #3e3b47;
    border-radius: 10px;
    color: #fff;
  }

  .DayPicker:not(.DayPicker--interactionDisabled)
    .DayPicker-Day:not(.DayPicker-Day--disabled):not(.DayPicker-Day--selected):not(.DayPicker-Day--outside):hover {
    background: ${shade(0.2, '#3e3b47')};
  }

  .DayPicker-Day--today {
    font-weight: normal;
  }

  .DayPicker-Day--disabled {
    color: #666360 !important;
    background: transparent !important;
  }

  .DayPicker-Day--selected {
    background: #ff9000 !important;
    border-radius: 10px;
    color: #232129 !important;
  }

@Dahan-Schuster
Copy link

Valeu @sethwololo!

@brunocsouto
Copy link

@ErickssonDrozda
Copy link

Muito bom, obrigado!

@rafael6g
Copy link

rafael6g commented Sep 9, 2020

top. Obrigado

@danielschuabramos
Copy link

Boa @sethwololo, valeu!

@joaovitormarquim
Copy link

Valeu, @sethwololo !

@jpcmf
Copy link

jpcmf commented Sep 16, 2020

Thanks @sethwololo!

@josuegimenes
Copy link

Show! Obrigado!

@italosnunes
Copy link

Boa! Ficou show @sethwololo

@lorenasg1
Copy link

lorenasg1 commented Sep 28, 2020

Atualizando a melhoria do @sethwololo:

Substituí a seta padrão pela do layout do figma e alterei a cor dos dias da semana pra ficar igual a dos dias desabilitados.

  .DayPicker {
    border-radius: 0.6rem;
  }

  .DayPicker-wrapper {
    padding-bottom: 0;
    background: #3e3b47;
    border-radius: 0.6rem;
  }

  .DayPicker,
  .DayPicker-Month {
    width: 100%;
  }

  .DayPicker-NavButton {
    color: #999591 !important;
  }

  .DayPicker-NavButton--prev {
    background: url(${ArrowLeftIcon}) no-repeat center;
    right: auto;
    left: 1.5em;
    margin-right: 0;
  }

  .DayPicker-NavButton--next {
    background: url(${ArrowRightIcon}) no-repeat center;
  }

  .DayPicker-Month {
    border-collapse: separate;
    border-spacing: 8px;
    margin: 1rem 0 0 0;
    padding: 16px;
    background-color: #28262e;
    border-radius: 0 0 10px 10px;
  }

  .DayPicker-Caption {
    margin-bottom: 1rem;
    padding: 0 1rem;
    color: #f4ede8;

    > div {
      text-align: center;
    }
  }

  .DayPicker-Weekday {
    color: #666360;
  }

  .DayPicker-Day {
    width: 2.5rem;
    height: 2.5rem;
  }

  .DayPicker-Day--available:not(.DayPicker-Day--outside) {
    background: #3e3b47;
    border-radius: 0.6rem;
  }

  .DayPicker:not(.DayPicker--interactionDisabled)
    .DayPicker-Day:not(.DayPicker-Day--disabled):not(.DayPicker-Day--selected):not(.DayPicker-Day--outside):hover {
    background: ${shade(0.2, '#3e3b47')};
  }

  .DayPicker-Day--today {
    font-weight: normal;
    color: #fff;
  }

  .DayPicker-Day--disabled {
    color: #666360;
    background: transparent !important;
  }

  .DayPicker-Day--selected {
    background: #ff9000 !important;
    border-radius: 0.6rem;
    color: #232129 !important;
  }

@fnoquiq
Copy link

fnoquiq commented Oct 1, 2020

Atualizando a melhoria do @sethwololo:

Substituí a seta padrão pela do layout do figma e alterei a cor dos dias da semana pra ficar igual a dos dias desabilitados.

@lorenasg1 faltou os import das setas

@AdSoNaTuRaL
Copy link

Atualizando a resposta da @lorenasg1.
Para baixar os SVG (import que estão faltando, basta ir no Figma do GoBarber e exportar as setas em formato SVG e por o mesmo nome dos imports do código dela).
Para baixar diretamente basta clicar aqui e extrair os svg's.

Depois de baixado, basta colocar os svg's na pasta de assets e fazer os imports no css.

import ArrowLeftIcon from '../../assets/ArrowLeftIcon.svg'; import ArrowRightIcon from '../../assets/ArrowRightIcon.svg';

@haryelramalho
Copy link

Boa galera, que demais!

@lucasengel
Copy link

lucasengel commented Oct 22, 2020

Como tá tudo em EM, só faltou colocar um font-size: 16px no .DayPicker. Aí fica show.

.DayPicker {
    border-radius: 10px;
    font-size: 16px;
}

@conradoalexsander
Copy link

Valeu galera, ficou top!

@euguilhermegirardi
Copy link

Boaaaa!

@piqueno43
Copy link

Valeu d+++!

@cabrazil
Copy link

cabrazil commented Nov 26, 2020

Muito bom!

@arianeborges
Copy link

Arrasaram!

@guintoki
Copy link

guintoki commented Dec 8, 2020

Muito bom!!

@guiathayde
Copy link

@sethwololo @lorenasg1 @AdSoNaTuRaL
Muito bom pessoal valeu!

@luanrem
Copy link

luanrem commented Dec 12, 2020

Caraca, muito bom pessoal! Muito obrigado mesmo! Ficou TOP

@lucianolimafer
Copy link

A alterações ficaram muito massa!!

@adeonir
Copy link

adeonir commented Feb 7, 2021

Segue mais uma melhoria com alguns ajustes e incluindo o background do header, aproveitando o código já feito pelos colegas:

.DayPicker {
  border-radius: 10px;

  &-wrapper {
    padding-bottom: 0;
    background: #28262e;
    border-radius: 10px;
    z-index: 0;
  }

  &-NavBar {
    position: relative;

    ::before {
      content: '';
      width: 100%;
      height: 50px;
      position: absolute;
      background: #3e3b47;
      border-radius: 10px 10px 0 0;
      z-index: -1;
    }
  }

  &-NavButton {
    color: #999591 !important;
    margin-top: 0;
    top: 0;

    &--prev {
      background: url(${ArrowLeftIcon}) no-repeat center;
      margin-right: 0;
      left: 12px;
      width: 50px;
      height: 50px;
    }

    &--next {
      background: url(${ArrowRightIcon}) no-repeat center;
      right: 12px;
      width: 50px;
      height: 50px;
    }
  }

  &-Month {
    border-collapse: separate;
    border-spacing: 8px;
    margin: 0;
    padding: 0 10px 10px;
  }

  &-Caption {
    line-height: 50px;
    color: #f4ede8;

    > div {
      text-align: center;
    }
  }

  &-Weekday {
    color: #666360;
    font-size: 16px;
  }

  &-Day {
    width: 40px;
    height: 40px;
    transition: all 0.2s ease;
    border-radius: 10px;

    &--today {
      font-weight: normal;
      color: #fff;
    }

    &--available:not(.DayPicker-Day--outside) {
      background: #3e3b47;
      border-radius: 10px;
    }

    &--disabled {
      color: #666360;
      background: transparent !important;
    }

    &--selected:not(.DayPicker-Day--disabled) {
      background: #ff9000 !important;
      color: #232129 !important;
    }
  }

  &:not(.DayPicker--interactionDisabled)
    .DayPicker-Day:not(.DayPicker-Day--disabled):not(.DayPicker-Day--selected):not(.DayPicker-Day--outside):hover {
    background: ${shade(0.2, '#3e3b47')};
  }
}

@joaonew
Copy link

joaonew commented Feb 16, 2021

Mitaram!

@moluskorp
Copy link

Vocês são ninjas do css mesmo em.. kakaka, Show de bola pessoal , valeu demais !

@maxmillernunes
Copy link

Value pelas atualizações no css.
@sethwololo, @lorenasg1, @adeonir mitaram de verdade.

@flipdantas
Copy link

Ficou muito bom galera! Ficaram top as alterações

@gustavoroque
Copy link

Muito legal pessoal, parabéns pelo trampo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment