You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
614 B
18 lines
614 B
import {ColorPreset} from "../models/Colors";
|
|
import {deleteRequest, getRequest, postRequest, putRequest} from "../helpers/rest";
|
|
|
|
export function listColorPresets(): Promise<ColorPreset[]> {
|
|
return getRequest("/color-presets");
|
|
}
|
|
|
|
export function addColorPreset(name: string, colorString: string) {
|
|
return postRequest("/color-presets", {name, colorString});
|
|
}
|
|
|
|
export function editColorPreset(id: number, name: string, colorString: string) {
|
|
return putRequest(`/color-presets/${id}`, {name, colorString});
|
|
}
|
|
|
|
export function deleteColorPreset(id: number) {
|
|
return deleteRequest(`/color-presets/${id}`);
|
|
}
|