-
-
Notifications
You must be signed in to change notification settings - Fork 539
Expand file tree
/
Copy pathClearButton.tsx
More file actions
29 lines (26 loc) · 880 Bytes
/
ClearButton.tsx
File metadata and controls
29 lines (26 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
import * as React from 'react';
import {IconClose} from '../../Icon/IconClose';
export interface ClearButtonProps {
onClear: () => void;
}
export function ClearButton({onClear}: ClearButtonProps) {
return (
<button
className="text-sm text-primary dark:text-primary-dark inline-flex items-center hover:text-link duration-100 ease-in transition mx-1"
onClick={onClear}
title="모든 편집 내용을 지우고 샌드박스를 다시 로딩합니다."
type="button">
<IconClose className="inline mx-1 relative" />
<span className="hidden md:block">초기화</span>
</button>
);
}