Skip to content

Commit e3c4d4f

Browse files
committed
fix: use ColorResolvable type for accent color
1 parent a7b0a92 commit e3c4d4f

File tree

3 files changed

+14
-17
lines changed

3 files changed

+14
-17
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@
6262
"undici@>=6.0.0 <6.21.2": ">=6.21.2",
6363
"webpack-dev-server@<=5.2.0": ">=5.2.1",
6464
"on-headers@<1.1.0": ">=1.1.0",
65-
"form-data@>=4.0.0 <4.0.4": ">=4.0.4"
65+
"form-data@>=4.0.0 <4.0.4": ">=4.0.4",
66+
"tmp@<=0.2.3": ">=0.2.4"
6667
},
6768
"onlyBuiltDependencies": [
6869
"@swc/core",

packages/commandkit/src/components/v2/container.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import {
22
ActionRowBuilder,
3+
ColorResolvable,
34
ComponentBuilder,
45
ContainerBuilder,
56
ContainerComponentData,
67
FileBuilder,
78
MediaGalleryBuilder,
9+
resolveColor,
810
SectionBuilder,
911
SeparatorBuilder,
1012
TextDisplayBuilder,
@@ -15,7 +17,8 @@ import { applyId } from './common';
1517
* Represents the properties for a container component.
1618
*/
1719
export interface ContainerProps
18-
extends Omit<ContainerComponentData, 'type' | 'components'> {
20+
extends Omit<ContainerComponentData, 'type' | 'components' | 'accentColor'> {
21+
accentColor?: ColorResolvable;
1922
children?: ComponentBuilder[];
2023
}
2124

@@ -35,7 +38,7 @@ export function Container(props: ContainerProps): ContainerBuilder {
3538
applyId(props, container);
3639

3740
if (typeof props.accentColor != null) {
38-
container.setAccentColor(props.accentColor);
41+
container.setAccentColor(resolveColor(props.accentColor!));
3942
}
4043

4144
if (props.spoiler != null) {

pnpm-lock.yaml

Lines changed: 7 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)