기본 Styleguide 완료
This commit is contained in:
@@ -71,5 +71,11 @@
|
||||
<utk:UTKButton name="btn-disabled-text" text="Disabled" variant="Text" is-enabled="false" />
|
||||
</VisualElement>
|
||||
</VisualElement>
|
||||
|
||||
<!-- Code Sample -->
|
||||
<VisualElement class="utk-code-sample-container">
|
||||
<utk:UTKCodeBlock title="C#" code="// 기본 버튼 생성 var btn = new UTKButton("확인"); btn.OnClicked += () => Debug.Log("클릭됨!"); // 텍스트와 Material Icon이 있는 버튼 var saveBtn = new UTKButton("저장", UTKMaterialIcons.Save, UTKButton.ButtonVariant.Primary); // 텍스트와 아이콘 (크기 지정) var largeIconBtn = new UTKButton("설정", UTKMaterialIcons.Settings, UTKButton.ButtonVariant.Primary, 28); var smallImageBtn = new UTKButton("닫기", UTKImageIcons.BtnClose22, UTKButton.ButtonVariant.Danger, 20); // Image Icon 설정 var imgBtn = new UTKButton("닫기"); imgBtn.SetImageIcon(UTKImageIcons.BtnClose22); imgBtn.SetImageIconByName("icon_setting_22"); // 비동기 아이콘 설정 await btn.SetMaterialIconAsync(UTKMaterialIcons.Search); await btn.SetImageIconAsync(UTKImageIcons.IconSetting22); // 아이콘만 표시하는 버튼 var iconOnlyBtn = new UTKButton { IconOnly = true }; iconOnlyBtn.SetMaterialIcon(UTKMaterialIcons.Close); // 버튼 스타일 변형 btn.Variant = UTKButton.ButtonVariant.Primary; btn.Variant = UTKButton.ButtonVariant.Danger; btn.Variant = UTKButton.ButtonVariant.Ghost; // 버튼 크기 btn.Size = UTKButton.ButtonSize.Small; btn.Size = UTKButton.ButtonSize.Large; // 아이콘 제거 btn.ClearIcon();" />
|
||||
<utk:UTKCodeBlock title="UXML" code="<!-- 기본 버튼 --> <utk:UTKButton text="확인" /> <!-- 버튼 변형 --> <utk:UTKButton text="저장" variant="Primary" /> <utk:UTKButton text="삭제" variant="Danger" /> <utk:UTKButton text="취소" variant="Ghost" /> <utk:UTKButton text="링크" variant="Text" /> <!-- 외곽선 변형 --> <utk:UTKButton text="확인" variant="OutlinePrimary" /> <utk:UTKButton text="삭제" variant="OutlineDanger" /> <!-- 크기 변형 --> <utk:UTKButton text="작은 버튼" size="Small" /> <utk:UTKButton text="큰 버튼" size="Large" /> <!-- 아이콘만 표시 --> <utk:UTKButton icon="&#xe5cd;" icon-only="true" /> <!-- 비활성화 --> <utk:UTKButton text="비활성화" is-enabled="false" /> <!-- 외곽선 굵기 --> <utk:UTKButton text="두꺼운 외곽선" border-width="2" />" />
|
||||
</VisualElement>
|
||||
</VisualElement>
|
||||
</UXML>
|
||||
|
||||
Reference in New Issue
Block a user