본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

Primer::ButtonComponent에서 이전하기

원문 보기 위키 갱신

Primer::ButtonComponent에서 이전하기 (Moving Away From Primer::ButtonComponent)

이 가이드는 이제 deprecated된 Primer::ButtonComponent에서 최신 Primer::Beta::Button 컴포넌트로 업그레이드하는 방법을 보여줍니다.

출처: 문서

본문

이 가이드는 이제 deprecated된 Primer::ButtonComponent에서 최신 Primer::Beta::Button 컴포넌트로 업그레이드하는 방법을 보여줍니다.

인자 (Arguments)

컴포넌트 초기화자의 다음 인자들이 deprecated 버전과 최신 버전의 Primer Button 사이에서 변경되었습니다.

From Primer::ButtonComponent To Primer::Beta::Button Notes
dropdown n/a removed in Primer::Beta::Button
group_item n/a removed in Primer::Beta::Button
scheme scheme removed :outline value. use :invisible instead
variant size renamed; values remain the same

나머지 인자들은 동일하게 유지됩니다.

Primer::Beta::Button은 더 이상 그룹의 일부가 되기 위한 boolean 설정이나 초기화자 인자를 통한 dropdown caret을 지원하지 않습니다. 이 기능을 대체하는 방법은 다음 예제를 참고하세요.

  • 버튼 그룹(Button groups): Primer::Beta::ButtonGroup
  • 트레일링 카운터(Trailing counter): trailing_visual slot
  • 트레일링 캐럿(Trailing caret): trailing_action slot

슬롯 이름 (Slot Names)

다음 슬롯들이 최신 Primer Button에서 변경되었습니다.

From Primer::ButtonComponent To Primer::Beta::Button Notes
n/a trailing_action appears to the right of the trailing_visual slot

나머지 슬롯 이름들은 동일하게 유지됩니다.

← Back to development docs

더 알아보기 (Learn more)

  • 버튼 그룹을 사용하려면 Primer::Beta::ButtonGroup 문서와 예제를 확인해 보세요.
  • trailing_visual과 trailing_action 슬롯을 활용해 카운터와 캐럿을 구현해 보세요.
  • scheme 인자의 :outline 값이 :invisible으로 대체된 점에 유의해 코드를 업데이트하세요.